#ifndef _GUI_TIMER_H
#define _GUI_TIMER_H


#include<stdbool.h>
#include<stdio.h>
#include<sys/list.h>

typedef struct gui_timer gui_timer_t;
typedef struct gui_spirit gui_spirit_t;

typedef bool (*gui_timer_callback_t)(gui_spirit_t*,gui_timer_t*,void*);

typedef struct gui_timer
{
    list_t list;
    uint32_t timer_id;
    uint32_t interval;
    gui_timer_callback_t callback;
    gui_timer_callback_t calldata;
}gui_timer_t;

gui_timer_t *gui_timer_create(uint32_t interval,gui_timer_callback_t callback,gui_timer_callback_t calldata);
int gui_timer_destroy(gui_timer_t *timer);

#endif